home *** CD-ROM | disk | FTP | other *** search
-
-
-
- FFFFGGGGRRRREEEEPPPP((((1111)))) FFFFGGGGRRRREEEEPPPP((((1111))))
-
-
-
- NNNNAAAAMMMMEEEE
- fgrep - search a file for a character string
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- ffffggggrrrreeeepppp [options] string [file ...]
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- _f_g_r_e_p (fast _g_r_e_p) searches files for a character string and prints all
- lines that contain that string. _f_g_r_e_p is different from _g_r_e_p(_1) and
- _e_g_r_e_p(_1) because it searches for a string, instead of searching for a
- pattern that matches an expression. It uses a fast and compact
- algorithm.
-
- The characters $$$$, ****, [[[[, ^^^^, |, ((((, )))), and \\\\ are interpreted literally by
- _f_g_r_e_p, that is, _f_g_r_e_p does not recognize full regular expressions as does
- _e_g_r_e_p. Since these characters have special meaning to the shell, it is
- safest to enclose the entire _s_t_r_i_n_g in single quotes ''''...''''.
-
- If no files are specified, _f_g_r_e_p assumes standard input. Normally, each
- line found is copied to the standard output. The file name is printed
- before each line found if there is more than one input file.
-
- Command line options are:
-
- ----bbbb Precede each line by the block number on which it was found. This
- can be useful in locating block numbers by context (blocks are 512
- bytes long and number from 0).
- ----cccc Print only a count of the lines that contain the pattern.
- ----iiii Ignore upper/lower case distinction during comparisons.
- ----llll Print the names of files with matching lines once, separated by
- new-lines. Does not repeat the names of files when the pattern is
- found more than once.
- ----nnnn Precede each line by its line number in the file (first line is 1).
- ----ssss Silent mode. No pattern matches or error messages are printed.
- This option allows command expressions to check _f_g_r_e_p's exit status
- without having to deal with output.
- ----vvvv Print all lines except those that contain the pattern.
- ----xxxx Print only lines matched entirely.
- ----eeee _s_p_e_c_i_a_l__s_t_r_i_n_g
- Search for a _s_p_e_c_i_a_l _s_t_r_i_n_g (_s_t_r_i_n_g begins with a ----).
- ----ffff _f_i_l_e
- Take the list of _s_t_r_i_n_g_s from _f_i_l_e.
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- ed(1), egrep(1), grep(1), sed(1), sh(1).
-
- DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
- Exit status is 0 if any matches are found, 1 if none, 2 for syntax errors
- or inaccessible files (even if matches were found).
-
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- FFFFGGGGRRRREEEEPPPP((((1111)))) FFFFGGGGRRRREEEEPPPP((((1111))))
-
-
-
- BBBBUUUUGGGGSSSS
- Ideally there should be only one _g_r_e_p command, but there is not a single
- algorithm that spans a wide enough range of space-time tradeoffs. Lines
- are limited to BUFSIZ characters; longer lines are truncated. BUFSIZ is
- defined in ////uuuussssrrrr////iiiinnnncccclllluuuuddddeeee////ssssttttddddiiiioooo....hhhh.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-